﻿#include "labelinfodlg.h"
#include "ui_labelinfodlg.h"
#include <QMessageBox>

LabelInfoDlg::LabelInfoDlg(QDialog *parent) :
    QDialog(parent),
    ui(new Ui::LabelInfoDlg)
{
    ui->setupUi(this);
    this->setWindowTitle(QStringLiteral("标签信息"));
}

LabelInfoDlg::~LabelInfoDlg()
{
    delete ui;
}

void LabelInfoDlg::on_btnOK_clicked()
{
    m_labelTxt = ui->plainTextEdit->toPlainText().trimmed();
    if(m_labelTxt.isEmpty()){
        QMessageBox::information(NULL,QStringLiteral("标签信息"),QStringLiteral("请输入标签信息"));
        return;
    }
    done(Accepted);
}

void LabelInfoDlg::on_btnCancel_clicked()
{
    done(Rejected);
}
